package com.hundred.user.dao.impl;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.hundred.item.dao.dataobject.ItemDO;
import com.hundred.user.dao.UserDAO;
import com.hundred.user.dao.dataobject.AppUserDO;

public class UserDAOImpl extends SqlMapClientDaoSupport  implements UserDAO {

	public AppUserDO getAppUserByUserId(String userId) {
		return (AppUserDO) this.getSqlMapClientTemplate().queryForObject("AppUser.querySingleAppUserById",userId);
	}

	public boolean updateUserInfo(AppUserDO appUserDO) {
		return this.getSqlMapClientTemplate().update("AppUser.updateUser", appUserDO)>0;
	}

	public boolean insertUser(AppUserDO appUserDO) {
		this.getSqlMapClientTemplate().insert("AppUser.insertUser", appUserDO);
		return true;
	}

}
